/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author hancing
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface DpOrder extends BasicModel<DpOrder> {
  title?: string; // 订单名称
  userno?: string; // 用户账号
  jinger?: number; // 金额
  outpayno?: string; // 订单号
  ordertype?: string; // 订单类型
  paytype?: string; // 支付方式
  dikoujiner?: number; // 余额扣款
  wxjiner?: string; // 微信支付金额
  iswxpay?: string; // 是否支付
  paytime?: string; // 支付时间
}

export const dpOrderList = (params?: DpOrder | any) =>
  defHttp.get<DpOrder>({ url: adminPath + '/dp/order/dpOrder/list', params });

export const dpOrderListData = (params?: DpOrder | any) =>
  defHttp.post<Page<DpOrder>>({ url: adminPath + '/dp/order/dpOrder/listData', params });

export const dpOrderForm = (params?: DpOrder | any) =>
  defHttp.get<DpOrder>({ url: adminPath + '/dp/order/dpOrder/form', params });

export const dpOrderSave = (params?: any, data?: DpOrder | any) =>
  defHttp.postJson<DpOrder>({ url: adminPath + '/dp/order/dpOrder/save', params, data });

export const dpOrderDelete = (params?: DpOrder | any) =>
  defHttp.get<DpOrder>({ url: adminPath + '/dp/order/dpOrder/delete', params });
